<?php

swoole_process::signal(SIGALRM, function() {
    echo "1\n";
    static $i = 0;
    echo "$i \n";
    $i++;
    if ($i > 10) {
        swoole_process::alarm(-1);
    }
});

 swoole_process::alarm(100 * 1000);